#!/usr/bin/env ts-node
import { PrismaClient, Prisma } from "@prisma/client";

const prisma = new PrismaClient();

async function main() {
  console.log("should work");
  const createUser = await prisma.user.create({
    data: {
      password: "syj",
      telephone: "15560316360",
      profile: {
        create: {
          name: "尚映杰",
          allowedPages: ["home", "person_management", "house_management"],
          telephone: "15560316360",
          email: "me@shangcode.cn",
          bio: "男",
          house: "二区三户",
        },
      },
    },
  });
}

main()
  .catch((e) => {
    throw e;
  })
  .finally(async () => {
    await prisma.$disconnect();
  });
